﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace PRE.Thongke_Baocao
{
    public partial class FrmCacDNsaxxuatSPko_cungLV : DevExpress.XtraEditors.XtraForm
    {
        DAL.ThongKeBaoCaoDAL _dal = new DAL.ThongKeBaoCaoDAL();
        public FrmCacDNsaxxuatSPko_cungLV()
        {
            InitializeComponent();
        }

        private void FrmCacDNsaxxuatSPko_cungLV_Load(object sender, EventArgs e)
        {
            DataTable _dtb = _dal.select_DNsxSPkhongdungLV();
            grcMain.DataSource = _dtb;
            txtmadn.DataBindings.Clear();
            txttendn.DataBindings.Clear();
            txtdc.DataBindings.Clear();
            txtdt.DataBindings.Clear();
            txtfax.DataBindings.Clear();
            txtsl.DataBindings.Clear();
            txtmadn.DataBindings.Add("EditValue", _dtb, ".MSDN");
            txtdc.DataBindings.Add("EditValue", _dtb, ".DC");
            txttendn.DataBindings.Add("EditValue", _dtb, ".TENDN");
            txtdt.DataBindings.Add("EditValue", _dtb, ".DT");
            txtfax.DataBindings.Add("EditValue", _dtb, ".FAX");
            txtsl.DataBindings.Add("EditValue", _dtb, ".sl");
        }

        private void btthoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            

            var frm = new Thongke_Baocao.FrmchitietcacDNsanxuatSPkocungLV();
            frm.madn = txtmadn.Text; ;
            frm.ShowDialog();
        }
    }
}